<template>
  <div>
      <bread-crumb :names="['首页', '权限管理', '权限列表']"></bread-crumb>
          <h2>此页面为开发人员测试页,您可不予理会</h2>
      <el-card class="box-card" shadow='hover'>
          <el-table
      :data="rightsList"
      border
       style="width: 100%"
     >
      <el-table-column
       type='index'
        label="#"
        align='center'
        >
      </el-table-column>
      <el-table-column
        prop="authName"
        label="权限名称"
         align='center'
      >
      </el-table-column>
      <el-table-column
        prop="path"
        label="路径"
         align='center'
        >
      </el-table-column>
      <el-table-column
        label="权限等级"
         align='center'>
         <template #default='{row}'>
            <el-tag v-if='row.level==0'>一级</el-tag>
         <el-tag type="success" v-else-if="row.level==1">二级</el-tag>
         <el-tag type="warning" v-else>三级</el-tag>
         </template>
      </el-table-column>
    </el-table>
      </el-card>
  </div>
</template>

<script>
import BreadCrumb from "common/BreadCrumb";
import {getRightsList} from 'network/axios'
export default { 
        name:'Rights',
        components:{BreadCrumb},
        created(){
              getRightsList().then(res=>{
                console.log(res);
                this.rightsList=res.data.data
                console.log(this.rightsList);
              }).catch(err=>{
                console.log(err);
              })
        },
        data(){
          return{
            rightsList:[]
          }
        }
}
</script>

<style scoped>
   
</style>